Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#12048] Migrate tests for GetUsageStatisticsActionTest #13245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

InfinityTwo
Copy link
Contributor

Part of #12048

Outline of Solution
Added the unit tests for GetUsageStatisticsActionTest for PostgreSQL.

Copy link
Contributor

@jasonqiu212 jasonqiu212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! good work

@jasonqiu212
Copy link
Contributor

Was thinking if we can explore abstracting the access control tests in sqlui/webapi/BaseActionTest.java, like in the old tests. Currently, I feel like there's a lot of repeated code for testing access control

@jasonqiu212 jasonqiu212 added the s.FinalReview The PR is ready for final review label Feb 27, 2025
@InfinityTwo
Copy link
Contributor Author

Was thinking if we can explore abstracting the access control tests in sqlui/webapi/BaseActionTest.java, like in the old tests. Currently, I feel like there's a lot of repeated code for testing access control

Hmm, great idea, I was thinking of it as well instead of copy pasting it for each new migrated test. I think the next time I work on it, I'll add the abstraction and do a refactor of the PRs.

Do you think we should make it similar to the previous method names such as verifyOnlyAdminsCanAccess() or should we have one method for it all, and pass in 6? boolean parameters for each user type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s.FinalReview The PR is ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants